Skip to content

fix: reject malformed metadata file versions - #846

Merged
wgtmac merged 1 commit into
apache:mainfrom
fallintoplace:fix/reject-malformed-metadata-versions
Aug 21, 2026
Merged

fix: reject malformed metadata file versions#846
wgtmac merged 1 commit into
apache:mainfrom
fallintoplace:fix/reject-malformed-metadata-versions

Conversation

@fallintoplace

@fallintoplace fallintoplace commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • reject malformed and out-of-range version segments in metadata filenames instead of accepting a valid numeric prefix
  • start generated metadata filenames at version 0 when the current version cannot be parsed, matching Java
  • add coverage for trailing characters, overflow, and an empty version segment through the metadata write path

Testing

  • arrow_test --gtest_filter=MetadataIOTest.WriteMetadataWithBase
  • full CTest suite (17 test binaries)

Comment thread src/iceberg/table_metadata.cc

@wgtmac wgtmac left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late review. Thanks @fallintoplace and @evindj!

@wgtmac
wgtmac merged commit 268883e into apache:main Aug 21, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants